package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.UserDetail;
import com.ruoyi.system.api.factory.RemoteUserDetailFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "remoteUserDetailService",value = ServiceNameConstants.SYSTEM_SERVICE,fallbackFactory = RemoteUserDetailFallbackFactory.class)
public interface RemoteUserDetailService {

    @GetMapping("/detail/inner/personal")
    public R<UserDetail> getInnerPersonal(@RequestParam("userId")Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE)String source);
}
